${attributes["Code"]} {
  CAPTION = ${attributes["Caption"]}
  PAPERCODE = 
  AOCODE = 
  STYLE = NORMAL
  STEPMAX = 0
  STEPCOUNT = 0
  STEPX = 0
  STEPY = 0
  ENDPAGETIMING = AFTER
  DRAWINFO {
  }
  FRAMES {
  }
  HEADER {
    <% prtform = attributes["prtform"] %>
    % for key, val in prtform.items():
	    % if key != 'root':
            <% x1 = val[0][0]* 100 %>
            <% y1 = val[0][1]* 100 %>
            <% width = val[0][2]* 100 - x1 %>
            <% height = val[0][3]* 100 - y1 %>
    RECT_${key} = RECT,${x1},${y1},${width},${height},0,0,,,FALSE,FALSE,,0
        % endif
    % endfor
    % for key, val in prtform.items():
        % if key == 'root':
		    <% space = "" %>
        % else:
		    <% space = "  " %>
    RECT_${key} {
        % endif
        % for i in range(1, len(val)):
	        <% item = val[i] %>
            % if item[0].find('LBL_') >= 0:
                <% x = int(item[1] * 100) %>
                <% y = int(item[2] * 100) %>
                <% text = item[3] %>
                <% length = item[4] %>
    ${space}${item[0]} = LABEL,${x},${y},1000,400,${length},1,,"${text}",FALSE,FALSE,,0
            % elif item[0].find('LINE_') >= 0:
                <% x1 = int(item[1] * 100) %>
                <% y1 = int(item[2] * 100) %>
                <% width = int(item[3] * 100) - x1 %>
                <% height = int(item[4] * 100) - y1 %>
    ${space}${item[0]} = LINE,${x1},${y1},${width},${height},0,0,,,FALSE,FALSE,,0
            % elif item[0].find('BOX_') >= 0:
                <% x1 = int(item[1] * 100) %>
                <% y1 = int(item[2] * 100) %>
                <% width = int(item[3] * 100) - x1 %>
                <% height = int(item[4] * 100) - y1 %>
    ${space}${item[0]} = RECT,${x1},${y1},${width},${height},0,0,,,FALSE,FALSE,,0
            % endif
        % endfor
        % if key != 'root':
    }
        % endif
    % endfor
  }
  ITEMS {
    % for key, val in prtform.items():
        % for i in range(1, len(val)):
            <% item = val[i] %>
            % if item[0].find('TXT_') >= 0:
                <% x = int(item[1] * 100) %>
                <% y = int(item[2] * 100) %>
                <% text = item[3] %>
                <% length = item[4] %>
    ${item[0]} = TEXT,${x},${y},1000,400,${length},1,,${text},FALSE,FALSE,,1,$VALUE,
            % endif
        % endfor
    % endfor
  }
  FOOTER {
  }
  GRAPHINFO {
  }
}
